/**
 * @author 
 * Yannic Remmet			196983
 * Tobias Trabelsi			197112
 * Anna-Katharina Wickert	197122
 */


import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Collections;
import java.util.Random;


public class SixFrom49 {
	public static void main(String[] args) { // could it be that the LinkedList only can be used in the Main? oO Removing the main -> Errormessage! (Syntax error on token ";", { expected after this token.).
		LinkedList<Integer> numbAvail = new LinkedList<Integer>();
		Random r = new Random();
		
		
		for (int i= 1; i < 49; i++)
			numbAvail.add(i);
		
		ArrayList<Integer> six = new ArrayList<Integer>();
		int help;
		int random;
		for (int i = 0; i <6; i++){
			Collections.shuffle(numbAvail);
			random = r.nextInt(48-i);
			help = numbAvail.get(random);
			System.out.println("i: " + i + " random: " + random + " numAvail.get(random) " + help + " numbAvail.size() " + numbAvail.size());
			six.add(numbAvail.remove(random)); // For me: not help! -> help is the value of the index -> =!= index!
		}
		Collections.sort(six);
		
		for(int i = 0; i <6; i++) {
			System.out.print(six.get(i) + " " );
		}
		
	}
}
